home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Java 1996 August
/
Java - Summer 1996.iso
/
Linux
/
install
< prev
next >
Wrap
Text File
|
1996-07-31
|
6KB
|
199 lines
#!/bin/bash
# Copyright InfoMagic, Inc (c) 1996
YESNO=""
CURDIR=`pwd`
TMPDIR=/tmp
ROOTDIR=/
USRLOC=/usr/local
LIBCVER=/lib/libc.so.5.2.18
LDSOVER=/lib/ld-linux.so.1.7.14
oldversion() {
echo ""
echo "A previous version of the Java Development Kit has"
echo "been detected. Please remove it before installing"
echo "this version *OR* proceed at your own risk."
echo ""
echo "Do you wish to proceed anyway? [Y/N] "
read YESNO;
if [ "$YESNO" = "Y" -o "$YESNO" = "y" ]; then
return;
else
exit 0;
fi
}
clear
echo ""
echo "*********************************************************************"
echo "This script will install the 1.0.1 of the Java Developement Kit (JDK)"
echo "for Linux. In order for this to be successful, you must be running"
echo "an ELF distribution of Linux such as Slackware(tm) 3.X or RedHat(tm)"
echo "2.X. If you are not currently running an ELF based system, please"
echo "upgrade to one as the Java Development Kit will not work for you and"
echo "running this script will cause your system to become unstable."
echo "For additional information on running java, please consult the "
echo "java-linux-HOWTO.2.0 found on this cdrom."
echo "*********************************************************************"
(echo "TEST" > /usr/local/jdk.test) &> /dev/null
if [ -e /usr/local/jdk.test ]; then
rm /usr/local/jdk.test;
else
echo "";
echo "You are attempting to install to a read-only file-system";
echo "such as a CD-ROM. Please ensure you that you have";
echo "read/write permissions to continue.";
echo "";
exit 1;
fi
echo ""
echo -n "Do you wish to install the static version of Java? [Y/N] "
read YESNO;
if [ "$YESNO" = "Y" -o "$YESNO" = "y" ]; then
if [ -d /usr/local/java ]; then
oldversion;
else
mkdir /usr/local/java
fi
cd /usr/local
echo -n "Installing the static Java...";
tar zxfv $CURDIR/JDK-1.0.1/linux.jdk-1.0.1-try1.common.tar.gz >> /tmp/linux.java;
tar zxfv $CURDIR/JDK-1.0.1/linux.jdk-1.0.1-try3.static-motif.tar.gz >> /tmp/linux.java;
echo "Completed.";
else
echo ""
echo "********************************************************"
echo "To Install the dynamicly linked version of JDK, you"
echo "must have a working copy of ELF Moo-Tiff(tm) installed."
echo "********************************************************"
echo ""
echo -n "Do you wish to install the dynamic version of Java? [Y/N] "
read YESNO;
if [ "$YESNO" = "Y" -o "$YESNO" = "y" ]; then
if [ -d /usr/local/java ]; then
oldversion;
else
mkdir /usr/local/java
fi
cd /usr/local
echo -n "Installing the dynamic Java...";
tar zxfv $CURDIR/JDK-1.0.1/linux.jdk-1.0.1-try1.common.tar.gz >> /tmp/linux.java
tar zxfv $CURDIR/JDK-1.0.1/linux.jdk-1.0.1-try3.shared-motif.tar.gz >> /tmp/linux.java
echo "Completed.";
fi
fi
# A little admin stuff...
chmod -R 755 /usr/local/java
cp /etc/profile /tmp/profile.java
echo ""
echo "Your original /etc/profile has been saved to /tmp/profile.java."
echo "PATH=$PATH:/usr/local/java/bin" >> /etc/profile
echo ""
echo "***************************** WARNING ****************************"
echo "While it is necessary to upgrade parts of your system including"
echo "libc.so, libm.so, ld.so, and GNU make, "
echo "doing so could render your system unstable or un-usable. Please"
echo "make sure you have backed-up all important files and data before"
echo "proceeding. If you are installing on a RedHat system, you should"
echo "have already upgrading your system with the rpm files in"
echo "upgrade/RPMS and SHOULD NOT proceed with this upgrade."
echo "***************************** WARNING ****************************"
echo ""
echo -n "Proceed with upgrading? [Y/N] "
read YESNO;
if [ "$YESNO" = "N" -o "$YESNO" = "n" ]; then
exit 0;
fi
echo ""
echo -n "Do you wish to upgrade to libXpm.so.4.6? [Y/N] "
read YESNO;
if [ "$YESNO" = "Y" -o "$YESNO" = "y" ]; then
if [ -f /usr/X11R6/lib/libXpm.so.4.6 ]; then {
echo -n "libXpm.so.4.6: ";
echo "detected as installed...skipping libXpm upgrade.";
} else {
echo -n "Upgrading libXpm...";
cd $ROOTDIR
tar zxfv $CURDIR/upgrade/libXpm.3.4f-ELF.tar.gz >> /tmp/linux.java;
echo "Completed.";
} fi
fi
echo ""
echo -n "Do you wish to upgrade GNU make to avoid a bug from the lib upgrade? [Y/N] "
read YESNO;
if [ "$YESNO" = "Y" -o "$YESNO" = "y" ]; then
echo -n "Upgrading GNU make...";
cp $CURDIR/upgrade/make-3.74+direntfix /usr/bin/make
chmod 755 /usr/bin/make
echo "Completed.";
fi
echo ""
echo -n "Do you wish to upgrade your libs to libc.so.5.2.18 and libm.so.5.0.5? [Y/N] "
read YESNO;
if [ "$YESNO" = "Y" -o "$YESNO" = "y" ]; then
if [ -f $LIBCVER ]; then
echo "\n"
echo -n "$LIBCVER: ";
echo "detected as installed...skipping lib upgrade.";
else
echo -n "Upgrading libs...";
# This removes the soft links to avoid tar complaints...
rm /usr/lib/libc.so
rm /usr/lib/libm.so
rm /lib/libm.so.5
rm /lib/libc.so.5
cd $ROOTDIR
tar zxfv $CURDIR/upgrade/libc-5.2.18.bin.tar.gz >> /tmp/linux.java;
ln -sf /lib/libc.so.5.2.18 /lib/libc.so.5
ln -sf /lib/libm.so.5.0.5 /lib/libm.so.5
echo "Completed.";
fi
fi
echo ""
echo -n "Do you wish to upgrade ld.so to ld.so-1.7.14.tar.gz? [Y/N] "
read YESNO;
if [ "$YESNO" = "Y" -o "$YESNO" = "y" ]; then
if [ -f $LDSOVER ]; then
echo "\n"
echo -n "$LDSOVER: ";
echo "detected as installed...skipping ld.so upgrade.";
else
echo "\n"
echo -n "Upgrading ld.so...";
cd $ROOTDIR
tar zxfv $CURDIR/upgrade/ld.so-1.7.14.tar.gz >> /tmp/linux.java;
cd $TMPDIR/ld.so-1.7.14;
./instldso.sh >> /tmp/linux.java;
echo "Completed.";
fi
fi
echo ""
echo "------------------------------------------------------------------"
echo "Installation of the JDK is now complete. Please remember to add"
echo "/usr/local/java/bin to your path if you are not using bash. A"
echo "record of all files can be found in /tmp/linux.java. Also, please"
echo "consult the java-linux-HOWTO.2.0 found on this cdrom."
echo ""
echo "Now that you have updated your libs, please reboot your machine."
echo -n "Reboot now? [Y/N] "
read YESNO;
if [ "$YESNO" = "Y" -o "$YESNO" = "y" ]; then {
echo "ENJOY!";
shutdown -r now;
} fi
echo ""
echo "ENJOY!"
exit 0